From: Marco Trevisan (TreviƱo) Date: Mon, 29 Jun 2026 15:52:19 +0000 (+0200) Subject: notificationDaemon: Emit internal signals only to the shell proxy X-Git-Tag: archive/raspbian/50.5-1+rpi1^2~6^2^2~13 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5df9af992bfa2f2d24eebefeb689d8c1ebd1a996;p=gnome-shell.git notificationDaemon: Emit internal signals only to the shell proxy This is following the rationale of 0cbab090, and also applied to the internal gnome-shell notification service. Part-of: (cherry picked from commit 0e18223332340de430f103571c43732f9d05d9a3) --- diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index 186015cf5..797100e5d 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -5,6 +5,7 @@ import GObject from 'gi://GObject'; import Shell from 'gi://Shell'; import * as Config from '../misc/config.js'; +import {emitSignalToDestination} from '../misc/dbusUtils.js'; import * as Main from './main.js'; import * as MessageTray from './messageTray.js'; @@ -192,7 +193,7 @@ class FdoNotificationDaemon { notificationClosedReason = NotificationClosedReason.UNDEFINED; break; } - this._emitNotificationClosed(id, notificationClosedReason); + this._emitNotificationClosed(id, notificationClosedReason, invocation); notification.disconnectObject(this); }); } @@ -222,8 +223,8 @@ class FdoNotificationDaemon { hasDefaultAction = true; } else { notification.addAction(label, () => { - this._emitActivationToken(source, id); - this._emitActionInvoked(id, actionId); + this._emitActivationToken(source, id, invocation); + this._emitActionInvoked(id, actionId, invocation); }); } } @@ -231,8 +232,8 @@ class FdoNotificationDaemon { if (hasDefaultAction) { notification.connectObject('activated', () => { - this._emitActivationToken(source, id); - this._emitActionInvoked(id, 'default'); + this._emitActivationToken(source, id, invocation); + this._emitActionInvoked(id, 'default', invocation); }, this); } else { notification.connectObject('activated', () => { @@ -297,20 +298,23 @@ class FdoNotificationDaemon { ]; } - _emitNotificationClosed(id, reason) { - this._dbusImpl.emit_signal('NotificationClosed', + _emitNotificationClosed(id, reason, invocation) { + const sender = invocation.get_sender(); + emitSignalToDestination(this._dbusImpl, sender, 'NotificationClosed', GLib.Variant.new('(uu)', [id, reason])); } - _emitActionInvoked(id, action) { - this._dbusImpl.emit_signal('ActionInvoked', + _emitActionInvoked(id, action, invocation) { + const sender = invocation.get_sender(); + emitSignalToDestination(this._dbusImpl, sender, 'ActionInvoked', GLib.Variant.new('(us)', [id, action])); } - _emitActivationToken(source, id) { + _emitActivationToken(source, id, invocation) { + const sender = invocation.get_sender(); const context = global.create_app_launch_context(0, -1); const token = context.get_startup_notify_id(null, []); - this._dbusImpl.emit_signal('ActivationToken', + emitSignalToDestination(this._dbusImpl, sender, 'ActivationToken', GLib.Variant.new('(us)', [id, token])); } }